#!/bin/bash

echo "start refresh chainmaker..."
cd /certs
rm -rf ./*

cd /root/
rm -rf $1
rm -f $1.tar.gz
rm -f $1_base64

cp /opt/config/$1_base64 /root/
base64 -d $1_base64 > $1.tar.gz
tar -xzf $1.tar.gz
cp -r $1/* /certs/
echo "refresh done..."

